package com.huaju.enity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * Wages entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wages", catalog = "licai")
public class Wages implements java.io.Serializable {

	// Fields

	private Integer wid;
	private Integer comId;
	private Account account;
	private String wdesc;
	private Double wnum;
	private Date wtime;
	private Double basenum;
	private Double counum;
	private String etr;
	private Integer status;

	// Constructors

	/** default constructor */
	public Wages() {
	}

	/** full constructor */
	public Wages(Account account, String wdesc, Double wnum, Date wtime,
			Double basenum, Double counum, String etr) {
		this.account = account;
		this.wdesc = wdesc;
		this.wnum = wnum;
		this.wtime = wtime;
		this.basenum = basenum;
		this.counum = counum;
		this.etr = etr;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "wid", unique = true, nullable = false)
	public Integer getWid() {
		return this.wid;
	}

	public void setWid(Integer wid) {
		this.wid = wid;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "aid")
	public Account getAccount() {
		return this.account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

	@Column(name = "wdesc")
	public String getWdesc() {
		return this.wdesc;
	}

	public void setWdesc(String wdesc) {
		this.wdesc = wdesc;
	}

	@Column(name = "wnum", precision = 10)
	public Double getWnum() {
		return this.wnum;
	}

	public void setWnum(Double wnum) {
		this.wnum = wnum;
	}

	@Column(name = "wtime", length = 19)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" ) 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
	public Date getWtime() {
		return this.wtime;
	}

	public void setWtime(Date wtime) {
		this.wtime = wtime;
	}

	@Column(name = "basenum", precision = 10)
	public Double getBasenum() {
		return this.basenum;
	}

	public void setBasenum(Double basenum) {
		this.basenum = basenum;
	}

	@Column(name = "counum", precision = 10)
	public Double getCounum() {
		return this.counum;
	}

	public void setCounum(Double counum) {
		this.counum = counum;
	}

	@Column(name = "etr")
	public String getEtr() {
		return this.etr;
	}

	public void setEtr(String etr) {
		this.etr = etr;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getComId() {
		return comId;
	}

	public void setComId(Integer comId) {
		this.comId = comId;
	}

}